package com.projektio.io;

import java.io.InputStream;

public class ImageTranslationService
{
	ImageIO imageIO = new BitmapImageIO();
	ImageTranslator translator = new ImageTranslator();
	
	public ImageAttribute[] calculateImageAttributes(InputStream input)
	{
		Image image = imageIO.readImage(input);
		
		translator.setAlghoritm(new RectPixelCountAlgorithm());
		ImageAttribute[] attributes = translator.calculateImageAttributes(image);
		
		return attributes;
	}

}
